package com.springmvc.platform.base.datasource;

/**
 * @author 动态切换数据源枚举类
 * @create 2017/11/6
 * @modify
 */
public enum DynamicDataSourceGlobal {
    // 写库
    WRITE("dataSourceW", true),
    // 读库
    READ("dataSourceR", false),;

    // 数据源名称
    private String name;
    // 是否是默认数据源
    private boolean master;
    DynamicDataSourceGlobal(String name, boolean master) {
        this.master=master;
        this.name=name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isMaster() {
        return master;
    }

    public void setMaster(boolean master) {
        this.master = master;
    }
}
